package com.my.xadmin.security.service;

import com.my.framework.base.service.BaseService;
import com.my.framework.exception.ServiceException;
import com.my.framework.page.Page;
import com.my.xadmin.security.entity.Organization;

import java.io.InputStream;
import java.util.List;
public interface OrganizationService extends BaseService<Organization, Long>
{
    
    List<Organization> find(Long parentId, Page page);
    
    List<Organization> find(Long parentId, String name, Page page);
    
    Organization getTree();
    
    void save(Organization organization);
    
    Organization get(Long id);
    
    void update(Organization organization);
    
    void delete(Long id) throws ServiceException;
    
    Organization findByCode(String orgCode);
    
    List<Organization> findByParentId(Long parentId);
    
    List<Organization> findAll();
    
    List<Organization> findByAreaCode(String areaCode);
    
    Organization findByAreaCodeAndJglx(String areaCode, String jglx, String code);
    Organization findByAreaCodeAndJglx(String areaCode, String jglx);
    /**
     * true本地false外地
     * @param yycsdm
     * @return
     * @see [类、类#方法、类#成员]
     */
    boolean isLocal(String yycsdm);
    
    /**
     * 得到市级机构的区域代码
     * <功能详细描述>
     * @param areaCode
     * @return
     * @see [类、类#方法、类#成员]
     */
    String getCityCode(String areaCode);
    
    List<Organization> findByTbbzAndIsRoot(String tbbz, Boolean flag);
    

    List<Organization> makeTree(List<Organization> children);
    Organization makeCode(Organization organization, String param);

	Organization getTreeByOrg(Organization org);



}
